package com.anlgin.anl_tea.entities;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@Builder
@TableName("user")
@NoArgsConstructor
@AllArgsConstructor
public class User {

    private String userId;
    private String tel;
    private String eMail;
    private String username;
    private Integer integral;
    private String location;
    private Integer gender;
    private String image;
    private String status;

    private String password;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String birthday;


    public User(String userId, String tel, String eMail, String username) {
        this.userId = userId;
        this.tel = tel;
        this.eMail = eMail;
        this.username = username;
    }
}
